class BBox:
    """ 边界框类
    """
    bbox_xyxy: int = 0
    bbox_xywh: int = 1

    def __init__(self, bbox: list[int], conf: float, classes: int, bbox_type: int = bbox_xywh) -> None:
        """ 边界框配置

        :param bbox: 长度为4的整数列表, 表示xyxy类型的坐标或xywh类型的坐标
        :param conf: 边界框的置信度
        :param classes: 边界框物体的类别
        :param bbox_type: 边界框类型, 为xinfer_yolo.detect.bbox.xyxy或xinfer_yolo.detect.bbox.xywh
        """
        self.conf = conf
        self.classes = classes
        self.left, self.top, self.right, self.bottom = bbox

        match bbox_type:
            case BBox.bbox_xyxy:
                # 完善xyxy
                pass
            case BBox.bbox_xywh:
                pass
            case _:
                # todo 完善错误处理
                raise RuntimeError
